<script src="${request.contextPath}/assets/js/custom/auditManage.js" type="text/javascript"></script>
<div class="row">
<div class="col-12">
  <#include "appIntanceReferList.html">
  <#include "horizontalScaleProcessList.html">
  <div class="card">
    <div class="card-header">
      <h4 class="card-title">迁移计划</h4>
    </div>
    <div class="card-body">
      <div class="row">
        <h4 class="card-title">
          <i class="bi bi-globe"></i>填写迁移计划
        </h4>
      </div>
      <!-- BEGIN FORM-->
      <form class="form-horizontal form-bordered form-row-stripped">
        <div class="form-body">
          <div class="form-group row">
            <label class="col-form-label col-md-3 text-end">
              源实例ID:<font color='red'>(*)</font>:
            </label>
            <div class="col-md-5">
              <input type="text" name="sourceId" id="sourceId" class="form-control" onchange="testisNum(this.id)"/>
            </div>
          </div>

          <div class="form-group row">
            <label class="col-form-label col-md-3 text-end">
              目标实例ID:<font color='red'>(*)</font>:
            </label>
            <div class="col-md-5">
              <input type="text" name="targetId" id="targetId" class="form-control" onchange="testisNum(this.id)"/>
            </div>
          </div>

          <div class="form-group row">
            <label class="col-form-label col-md-3 text-end">
              开始slot:<font color='red'>(*)</font>:
            </label>
            <div class="col-md-5">
              <input type="text" name="startSlot" id="startSlot" class="form-control" onchange="testisNum(this.id)"/>
            </div>
          </div>

          <div class="form-group row">
            <label class="col-form-label col-md-3 text-end">
              结束slot:<font color='red'>(*)</font>:
            </label>
            <div class="col-md-5">
              <input type="text" name="endSlot" id="endSlot" class="form-control" onchange="testisNum(this.id)"/>
            </div>
          </div>

          <div class="form-group row">
            <label class="col-form-label col-md-3 text-end">
              批量migrate<font color='red'>(*)</font>:
            </label>
            <div class="col-md-5">
              <select id="migrateType" name="migrateType" class="form-select select2_category">
                <option value="0">
                  否
                </option>
                <option value="1">
                  是
                </option>
              </select>
            </div>
          </div>

          <div class="form-group row">
            <label class="col-form-label offset-md-2 col-md-8 text-left">
              redis版本低于<font color='red'>4.0.7</font>时，如待迁移集群设置有密码，由于redis migrate命令问题，不能正常执行，该情况下不支持水平扩容。
            </label>
          </div>

          <input type="hidden" name="appId" id="appId" value="${appAudit.appId}">
          <input type="hidden" name="appAuditId" id="appAuditId" value="${appAudit.id}">

          <div class="form-group row">
            <div class="offset-md-3 col-md-3">
              <button id="submitButton" disabled="disabled" type="button" class="btn btn-success" onclick="startHorizontalScale('${request.contextPath}')">
                <i class="bi bi-check"></i>
                开始迁移
              </button>
              <button id="checkButton" type="button" class="btn btn-success" onclick="checkHorizontalScale('${request.contextPath}')">
                <i class="bi bi-check"></i>
                验证格式
              </button>
            </div>
          </div>
        </div>
      </form>
      <!-- END FORM-->
    </div>
  </div>
</div>